package name.huzhenbo.java.patterns.memento;

import java.util.ArrayList;
import java.util.List;

class IncreaserMementor {
    private List<Integer> memList = new ArrayList<Integer>();

    public void addMem(int mem) {
        memList.add(mem);
    }

    public int decreaseMem() {
        return memList.size() > 0 ? memList.remove(memList.size() - 1) : 0;
    }
}
